package com.sls.web.manager.sys.service;

import java.util.List;

import com.sls.web.manager.page.Pagination;
import com.sls.web.manager.pojo.UserInfoVO;
import com.sls.web.manager.sys.pojo.OperatorVO;
import com.sls.web.manager.sys.pojo.Role;
import com.sls.web.manager.sys.querybean.OperatorQuery;

public interface OperatorService {
	/**
	 * 注册用户
	 * 
	 * @param operator
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public boolean regiest(OperatorVO operator, UserInfoVO userinfo)
			throws Exception;

	/**
	 * 根据account查询用户
	 * 
	 * @param operator
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public OperatorVO queryUserInfoById(String operatorAccount,
			UserInfoVO userInfoVO) throws Exception;

	/**
	 * 修改用户
	 * 
	 * @param operator
	 * @param userinfo
	 * @return
	 * @throws Exception
	 */
	public boolean updateUser(OperatorVO operator, UserInfoVO userinfo)
			throws Exception;

	/**
	 * 查询所有用户角色
	 * 
	 * @param operator
	 * @param ip
	 * @return
	 */
	public List<Role> queryrole(UserInfoVO userinfo);

	/**
	 * 登录
	 * 
	 * @param operator
	 * @param ip
	 * @return
	 * @throws Exception
	 */
	public OperatorVO login(OperatorVO operator, String ip) throws Exception;

	/**
	 * 查询操作员列表
	 * 
	 * @param operator
	 * @param ip
	 * @return
	 */
	public Pagination<?> queryOperator(OperatorQuery operator,
			UserInfoVO userinfo) throws Exception;

	/**
	 * 修改密码
	 * 
	 * @param pwd
	 * @param userinfo
	 * @return
	 */
	public boolean updatepwd(OperatorVO pwd, UserInfoVO userinfo) throws Exception;

	/**
	 * 校验注册用户是否已存在
	 * 
	 * @param operatorAccount
	 * @param ip
	 * @return
	 */
	public boolean checkUsername(OperatorVO operator, UserInfoVO userinfo);

	/**
	 * 注销用户
	 * 
	 * @param pwd
	 * @param userinfo
	 * @return
	 */
	public boolean cancelUser(OperatorVO operator, UserInfoVO userinfo) throws Exception;
}
